<template>
  <view class="container">
    <image :src="item" v-for="(item, index) in imageList" :key="index" @click="preview" class="avataritem" mode="aspectFill" :show-menu-by-longpress="true"></image>
  </view>
</template>

<script>
export default {
  data() {
    return {
      imageList: []
    };
  },
  onLoad(value) {
    console.log(value.imagelist);
    this.imageList = value.imagelist.split(',');
  },
  methods: {
    //
    preview() {
      uni.previewImage({
        urls: this.imageList,
        indicator: 'number',
        loop: true,
        success: (res) => {
          console.log(res);
        }
      });
    }
  }
};
</script>

<style>
.avataritem {
  display: inline-block;
  margin: 38rpx 0 0 38rpx;
  width: 198rpx;
  height: 198rpx;
  background: #ffffff;
  border-radius: 20rpx 20rpx 20rpx 20rpx;
  opacity: 1;
}
.container {
}
</style>
